feat(input): implement libvirtualhid#5368
Conversation
Bundle ReportChanges will increase total bundle size by 1.24kB (0.05%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: sunshine-esmAssets Changed:
|
92ddf06 to
d696dca
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #5368 +/- ##
==========================================
+ Coverage 26.68% 27.23% +0.55%
==========================================
Files 111 105 -6
Lines 25397 25121 -276
Branches 11231 11217 -14
==========================================
+ Hits 6777 6842 +65
- Misses 15597 16886 +1289
+ Partials 3023 1393 -1630
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 38 files with indirect coverage changes Continue to review full report in Codecov by Harness.
|
b09b74e to
c8d6008
Compare
4a64041 to
ed17e4f
Compare
ed17e4f to
67787f0
Compare
a3e7ed7 to
fe08cf1
Compare
Replace the macOS input implementation with a libvirtualhid-backed backend and route mouse, keyboard, scroll, touch/pen, and gamepad paths through shared virtualhid contexts. Update macOS CMake wiring to build/link libvirtualhid and include the new shared virtualhid input sources, and bump the libvirtualhid submodule to the required revision.
Move libvirtualhid integration from Linux/macOS/Windows compile definition files into common.cmake. This removes duplicated target/library/source wiring, keeps Linux-specific libevdev override variables set before inclusion, and preserves the libevdev -> libvirtualhid build dependency when using the ExternalProject fallback.
Refactor absolute mouse test to use platform-aware touch port helper and account for display origin offsets when verifying expected mouse position. Removes the incorrect `has_input_moved` assertion and updates libvirtualhid submodule.
Implement get_mouse_loc using GetCursorPos on Windows and XQueryPointer on Linux/X11. Remove the GTEST_SKIP for Windows and Linux virtual mouse tests. Replace fixed sleep with polling loop to wait for mouse movement, fix absolute mouse port to use virtual screen metrics on Windows, and relax movement assertions to direction-only checks to account for OS pointer acceleration.
Change `get_mouse_loc()` to return `std::optional<util::point_t>` instead of a sentinel value, properly indicating when the mouse location cannot be observed on a platform. Update all platform implementations (Linux, macOS, Windows) and tests to handle the optional return type. Add libxtst-dev dependency to Linux CI workflow.
Add `NOSONAR(cpp:S1313)` annotations to ViGEmBus version literals in `confighttp.cpp` and its unit test. This documents that `1.17.0.0` is a driver version, not an IP address, and prevents false-positive static analysis warnings.
e1bceb2 to
7b27b1d
Compare
7b27b1d to
bfc664c
Compare
Prefix selected virtual gamepad profile names with `Sunshine ` and switch Linux udev matching to the new `Sunshine (libvirtualhid)*` pattern. This removes per-controller rule duplication, keeps device permissions working across profiles, updates troubleshooting docs with the new PS5 device name, and bumps the libvirtualhid submodule to the matching revision.
bf4a745 to
6f6d4c1
Compare
6f6d4c1 to
58a4120
Compare
|
Broadened Back/Select-to-touchpad-click behavior from manual DS4-only to all PlayStation-style profiles (auto, DS4, and DS5) by reusing configured touchpad-capability checks in both Windows and virtualhid input paths. Updated config/docs/UI locale text to consistently describe PlayStation-style emulation, simplified the input tab headings/visibility logic, and added unit tests for touchpad support detection across profiles.


Description
This PR implements libvirtualhid in Sunshine, replacing inputtino on Linux, vigembus on Windows AMD64, and moves the mouse/keyboard input for macOS as well.
We will still falling back to vigembus on Windows ARM64 or in cases where the user doesn't have libvirtualhid's driver installed.
TODO:
Known issues:
Screenshot
Issues Fixed or Closed
Roadmap Issues
Type of Change
Checklist
AI Usage